#include <pybind11/pybind11.h>
namespace py = pybind11;

#if _WIN32
#include <windows.h>
#include <iostream>
void window_dll_search_path() {
    char buffer[4096];
    DWORD len = GetEnvironmentVariableA("PATH", buffer, sizeof(buffer));
    std::cout << "PATH: " << buffer << std::endl;
}
#endif

// 合并子模块
PYBIND11_MODULE(pyodv, m) {
    m.doc() = "pyodv module";

#if _WIN32
    m.def("window_dll_search_path", &window_dll_search_path);
#endif

    {
        py::module_ coreModule = py::module::import("_odv_core");
        m.attr("core") = coreModule;
    }

    {
        py::module_ guiModule = py::module::import("_odv_gui");
        m.attr("gui") = guiModule;
    }
    
    {
        //py::module_ module = py::module::import("_odv_callback");
        //m.attr("callback") = module;
    }
}
